//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_animaterespmarkers.sqf"
#include "xr_macros.sqf"

private ["_origmarker", "_respm", "_size", "_msize"];
{
	_origmarker = _x select 0;
	_respm = _x select 1;
	_size = _x select 2;
	_respm setMarkerPosLocal (markerPos _origmarker);
	_respm setMarkerDirLocal ((markerDir _respm) + 2);
	_msize = (markerSize _respm) select 0;
	_msize = _msize + _size;
	if (_msize >= 1.7) then {
		_x set [2, -0.015];
	} else {
		if (_msize <= 1) then {
			_x set [2, 0.015];
		};
	};
	_respm setMarkerSizeLocal [_msize, _msize];
	if (_forEachIndex > 0) then {
		_isavailable = [_forEachIndex] call FUNCXR(mobRespAvailable);
		_respm setMarkerColorLocal (if !(_isavailable select 0) then {
			"ColorRed"
		} else {
			"ColorGreen"
		});
		_x set [3, _isavailable select 1];
	};
	_sel = GVARXR(respmarkerar2) select _forEachIndex;
	_respm = _sel select 1;
	_respm setMarkerPosLocal (markerPos _origmarker);
} forEach GVARXR(respmarkerar);